
package com.wake.widget.skin.handler;

import android.view.View;

import com.wake.widget.skin.NMUISkinHelper;
import com.wake.widget.widget.NMUIProgressBar;
import com.wake.widget.widget.NMUISlider;

import org.jetbrains.annotations.NotNull;

public class NMUISkinRuleProgressColorHandler extends NMUISkinRuleColorHandler {

    @Override
    protected void handle(@NotNull View view, @NotNull String name, int color) {
        if (view instanceof NMUIProgressBar) {
            ((NMUIProgressBar) view).setProgressColor(color);
        }else if(view instanceof NMUISlider){
            ((NMUISlider) view).setBarProgressColor(color);
        }else{
            NMUISkinHelper.warnRuleNotSupport(view, name);
        }
    }
}
